<?php
/**
 * Created by @baidu-aip
 * Author: ylang
 * Time: 2022/2/24 12:33
 */

namespace Hedgehog\BaiduAip;

use Pimple\Container;
use Hedgehog\BaiduAip\Api\Orc;
use Pimple\ServiceProviderInterface;
use Hedgehog\BaiduAip\Api\AccessToken;
use Hedgehog\BaiduAip\Api\ImageClassify;

class ServiceProvider implements ServiceProviderInterface
{

    public function register(Container $pimple)
    {
        $pimple['access_token'] = function ($pimple) {
            return new AccessToken($pimple);
        };

        $pimple['image_classify'] = function ($pimple) {
            return new ImageClassify($pimple['access_token']);
        };

        $pimple['orc'] = function ($pimple) {
            return new Orc($pimple['access_token']);
        };
    }

}